<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div th:fragment="css">
    <link rel="stylesheet" th:href="@{/bootstrap/css/bootstrap.min.css}" href="static/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" th:href="@{/css/font-awesome.min.css}" href="static/css/font-awesome.min.css">
    <link rel="stylesheet" th:href="@{/css/main.css}" href="static/css/main.css">
<!--    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">-->
</div>

<div th:fragment="nav">
    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <div class="container-fluid">
            <div class="navbar-header">
                <div><a class="navbar-brand" style="font-size:32px;" th:href="@{/teacher/main}">网上作业提交与批改系统</a></div>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
                <ul class="nav navbar-nav navbar-right">
                    <li style="padding-top:8px;">
                        <div class="btn-group">
                            <button type="button" class="btn btn-default btn-success dropdown-toggle"
                                    data-toggle="dropdown">
                                <i class="glyphicon glyphicon-user"></i>[[${session.teacher.name}]]<span
                                    class="caret"></span>
                            </button>
                        </div>
                    </li>
                    <li style="margin-left:10px;padding-top:8px;">
                        <button onclick="shutdown()" type="button" class="btn btn-default btn-danger">
                            <span class="glyphicon glyphicon-question-sign"></span> 退出系统
                        </button>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
</div>

<div th:fragment="sider">
    <div class="col-sm-3 col-md-2 sidebar">
        <div class="tree">
            <ul style="padding-left:0px;" class="list-group">
                <li class="list-group-item tree-closed">
                    <i class="glyphicon glyphicon-dashboard"></i> 功能面板
                </li>
                <li class="list-group-item tree-closed">
                        <span><i class="glyphicon glyphicon glyphicon-tasks"></i> 课程管理 <span class="badge"
                                                                                             style="float:right">1</span></span>
                    <ul style="margin-top:10px;display:none;">
                        <li style="height:30px;">
                            <a th:href="@{/teacher/toCourseList}" href="teacher/toCourseList"><i class="glyphicon glyphicon-list-alt"></i> 我的课程</a>
                        </li>
                    </ul>
                    <ul style="margin-top:10px;display:none;">
                        <li style="height:30px;">
                            <a th:href="@{/teacher/toHomeworkList}"><i class="glyphicon glyphicon-list-alt"></i> 已发布作业</a>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
</div>

<div th:fragment="jsFile">
    <script th:src="@{/jquery/jquery-2.1.1.min.js}" src="static/jquery/jquery-2.1.1.min.js"></script>
    <script th:src="@{/bootstrap/js/bootstrap.min.js}" src="static/bootstrap/js/bootstrap.min.js"></script>
    <script th:src="@{/script/docs.min.js}" src="static/script/docs.min.js"></script>
    <script src="./layui/layui.js" th:src="@{/layui/layui.js}"></script>
    <script th:inline="javascript" type="text/javascript">
        // 获取项目路径
        var projectPath = [[${#httpServletRequest.getContextPath()}]];

        function shutdown() {
            window.location.href = projectPath + "/teacher/shutdown";
        }

    </script>
</div>

</body>